It happened in Chestnut Hill just before midnight on Wednesday, July 19, the department told Daily Voice.
When the would-be robbers approached the victim on the 7700 block of Stenton Avenue, police say he opened fire, striking one of the suspects "in the buttocks."
The wounded suspect, identified only as a 23-year-old man, was treated at Einstein Medical Center and is in stable condition with criminal charges pending, police said.
The other suspect is described as a "male wearing all dark clothing," detectives said.
The shooting remains under investigation.
Click here to follow Daily Voice Chambersburg and receive free news updates.